<template>
    <div id="table">
        <!-- <Table></Table> -->
        <component @changeType="changeType" :is="tableType==1?UnregisteredTable:Table"></component>
    </div>
    <div id="unregistered" >
        <!-- <UnregisteredTable/> -->
    </div>
</template>
<script setup>
import {ref} from 'vue'
import{useRouter, onBeforeRouteLeave} from 'vue-router'
import Table from '../../components/AdministrateStudentTable.vue'
import UnregisteredTable from '../../components/AdministrateUnregisteredStudentTable.vue'

const tableType = ref(2)

const changeType=function(type){
    console.log(type);
    tableType.value = type
}

</script>
<style scoped>
#table{

}
#unregistered{
    
}
</style>